package au.edu.uq.itee.engg2800.team19;
import gnu.io.SerialPort;
public enum DataBits {

	 DATABITS_8(SerialPort.DATABITS_8,"8"),
	 DATABITS_7(SerialPort.DATABITS_7,"7"),
	 DATABITS_6(SerialPort.DATABITS_6,"6"),
	 DATABITS_5(SerialPort.DATABITS_5,"5");

	 private int code;
	 private String displayName;

	 private DataBits(int c,String displayName) {

	   code = c;
	   this.displayName=displayName;
	 }

	 public int getCode() {
	   return code;
	 }

	static String[] enumsToStringArray() {
		   String[] results = new String[DataBits.values().length];
	        int count = 0;
	        for (DataBits each  : DataBits.values()) {
	            results[count] = each.toString();
	            count++;
	        }
	        return results;
	}

	@Override
	public String toString(){
	     return displayName;
	}
}